package com.aaa.system.service.impl;

import com.aaa.entity.Dept;
import com.aaa.system.dao.DeptDao;
import com.aaa.system.service.DeptService;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: his-open-parent
 * @description:
 * @author: 闫克起2
 * @create: 2023-03-21 11:10
 **/
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptDao deptDao;
    @Override
    public Result<List<Dept>> findAll() {
        QueryWrapper<Dept> wrapper=new QueryWrapper<>();
        wrapper.eq("status",0);
        List<Dept> list = deptDao.selectList(wrapper);
        return new Result<List<Dept>>(2000,"查询所有部门",list);
    }
}
